<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of connectMySQL
 *
 * @author Lojza
 */
class MySQLDatabase {

    var $link;

    function connect($user, $password, $database) {
        $this->link = new mysqli('infs3202-db.zones.eait.uq.edu.au', $user, $password, $database);
//        $this->link = new mysqli('localhost', $user, $password, $database);
        if (mysqli_connect_errno($this->link)) {
            die('Not connected : ' . mysqli_connect_error());
        }
        return $this->link;
    }

    function disconnect() {
        $this->link->close();
    }

}

?>
